// module.exports = {
//     entry: {
//         'index/index': './src/pages/index/wraps.js'
//     },
//     output: {
//         filename: 'build/pages/[name].bundle.js'
//     }
// };
//开始 webpack --watch
//webpack-dev-server --progress --colors
var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');

module.exports = {
 //插件项
 plugins: [commonsPlugin],
 //页面入口文件配置
 entry: {
     'index/index' : './index.js',
     'login/login' :'./src/pages/login/login.js',
     'show/show' :'./src/pages/show/show.js',
     '404/404' :'./src/pages/404/404.js',
     'note/note' :'./src/pages/note/note.js',
     'forum/forum' :'./src/pages/forum/forum.js'
 },
 //入口文件输出配置
 output: {
     filename: 'build/pages/[name].bundle.js',
     publicPath: "/webpack/"
 },
 module: {
     //加载器配置
     loaders: [
         { test:/\.html$/,loader:'raw'},
         { test: /\.css$/, loader: 'style!css'},
         { test: /\.js$/, loader: 'jsx-loader?harmony' },
         { test: /\.scss$/, loader: 'style!css!sass?sourceMap'},
         { test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192&name=images/[name].[ext]'},
         { test: /\.(eot|svg|ttf|woff)/, loader: 'file?name=fonts/[hash].[ext]'}
     ]
 },
 //其它解决方案配置
 resolve: {
     // root: 'F:\Demo\git\webpack', //绝对路径
     extensions: ['', '.js', '.json', '.scss'],
      alias: {
          AppStore : 'js/stores/AppStores.js',
          ActionType : 'js/actions/ActionType.js',
          AppAction : 'js/actions/AppAction.js'
      }
 }
};